<?php
    if(isset($_REQUEST['authcode'])){
        session_start();
        if(strtolower($_REQUEST['authcode']) == $_SESSION['authcode']){
            echo "输入正确";
        }else{
            echo "输入错误";
        }
        exit();
    }

?>

<html>
<head>
    <meta charset="utf-8"/>
    <title>确认验证码</title>
</head>
<body>
    <form action="./form.php" method="POST">
        <p>验证码：<img id="captcha_img" border="1" src="./captcha.php?r=<?php echo rand(); ?>" alt="" width="100" height="30">
            <a href="javascript:void(0)" onclick="document.getElementById('captcha_img').src='./captcha.php?r='+Math.random()">换一个？</a>
        </p>
        <p>输入验证码：<input type="text" name="authcode" value=""></p>
        <p><input type="submit" value="提交" style="padding:6px 20px;"></p>
    </form>
    <br>
    <br>
    <hr>
    <form action="./form.php" method="POST">
        <p>验证码：<img id="captcha_img_2" border="1" src="./captcha_img.php?r=<?php echo rand(); ?>" alt="" width="200" height="200">
            <a href="javascript:void(0)" onclick="document.getElementById('captcha_img_2').src='./captcha_img.php?r='+Math.random()">换一个？</a>
        </p>
        <p>输入验证码：<input type="text" name="authcode" value=""></p>
        <p><input type="submit" value="提交" style="padding:6px 20px;"></p>
    </form>

    <br>
    <br>
    <hr>
    <form action="./form.php" method="POST">
        <p>验证码：<img id="captcha_img_3" border="1" src="./captcha_cn.php?r=<?php echo rand(); ?>" alt="" width="200" height="200">
            <a href="javascript:void(0)" onclick="document.getElementById('captcha_img_3').src='./captcha_cn.php?r='+Math.random()">换一个？</a>
        </p>
        <p>输入验证码：<input type="text" name="authcode" value=""></p>
        <p><input type="submit" value="提交" style="padding:6px 20px;"></p>
    </form>
</body>
</html>